import request from '@/utils/request'

export function getApplyByPage(data) {
  return request({
    url: '/apply',
    params: { ...data }
  })
}

export function getApplyById(id) {
  return request({
    url: `/apply/${id}`,
  })
}

export function getByCurrent() {
  return request({
    url: `/apply/getByCurrent`,
  })
}

export function addApply(data) {
  return request({
    url: '/apply',
    method: 'post',
    data: data
  })
}

export function updateApplyById(data) {
  return request({
    url: `/apply`,
    method: 'put',
    data: data
  })
}

export function deleteApply(id) {
  return request({
    url: `/apply/${id}`,
    method: 'delete',
  })
}

export function batchDeleteApply(idList) {
  return request({
    url: `/apply/batchDelete`,
    method: 'post',
    data: idList
  })
}
